//
//  ATAreaPicker.h
//  NoPi
//
//  Created by 敖然 on 15/11/17.
//  Copyright © 2015年 nopi.com. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BaseModel.h"

typedef NS_ENUM(NSUInteger, ATAreaPickerType) {
    ATAreaPickerTypeStateAndCityAndDistrict = 0,
    ATAreaPickerTypeStateAndCity,
};

@class ATAreaModel;
@class ATCityResModel;
@interface ATAreaPicker : UIControl
@property (nonatomic, assign) ATAreaPickerType type;
@property (nonatomic, strong) ATAreaModel *areaModel;


- (void)setArea:(ATAreaModel *)areaModel animated:(BOOL)animated; // if animated is YES, animate the wheels of time to display the new area
@end

@interface ATAreaModel : BaseModel
@property (nonatomic, copy) NSString *state; // 省
@property (nonatomic, copy) NSString *city; // 市
@property (nonatomic, copy) NSString *district; // 区
@end

@interface ATStateResouce : BaseModel
/**
 *  省份
 */
@property (nonatomic, copy) NSString *state;
/**
 *  包含所有的城市
 */
@property (nonatomic, strong) NSArray<ATCityResModel *> *cities;
@end

@interface ATCityResModel : BaseModel
/**
 *  区/县
 */
@property (nonatomic, strong) NSArray<NSString *> *areas;
/**
 *  城市
 */
@property (nonatomic, copy) NSString *city;

@end

